<template>
  <div>
   <frame-header></frame-header>
    <frame-list></frame-list>
  </div>
</template>

<script>
import Cookies from 'js-cookie'
import FrameHeader from './components/header'
import FrameList from './components/list'

export default {
  name: 'frame',
  components: {
    FrameHeader,
    FrameList
  },
  methods: {
    judge () {
      if (!Cookies.get('id')) {
        this.$router.push('/loginError')
      }
    }
  },
  created () {
    this.judge()
  },
  mounted () {
    window.scrollTo(0, 0)
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .header
    position: relative
    line-height: $headerHeight
</style>
